<template>
  <div class="list">
    <list :list="list" @click="add1"></list>
    <h1>{{ name }}</h1>
  </div>
</template>
<script>
import list from '@/components/list.vue'
export default {
    components:{
        list
    },
    data(){
        return{
            list:'张三',
            name:''
        }
    },
    methods:{
        add1(val){
            console.log(val);
            this.name = val
        }
    }
};
</script>
<style>
.text {
  font-size: 14px;
}

.item {
  margin-bottom: 18px;
}

.clearfix:before,
.clearfix:after {
  display: table;
  content: "";
}
.clearfix:after {
  clear: both;
}

.box-card {
  width: 480px;
}
</style>